<!--
*@description 
*@fileName jarShowTwo.vue
*@author yao
*@date 2025/02/24 16:47:11
!-->
<template>
  <div>
    <!-- <jarShowIn></jarShowIn> -->
    <JarShowIn :positions="flatPositions" @position-click="handlePositionClick" />
  </div>
</template>

<script>
import * as gezi from "@/assets/response.js";
import JarShowIn from "./jarShowIn.vue";
export default {
  name: "jarShowTwo",
  // 组件传参
  props: {
    
  },

  data() {
    return {
      positions: gezi.default.gezi.data.coordinatePositionArrayList
    };
  },

  // 组件注册
  components: {
    JarShowIn,
  },

  // 数据监听
  watch: {},

  // 计算属性
  computed: {
    flatPositions() {

        // 将数据扁平化展示
        let flatPositions = [];
            for (let i = 0; i < this.positions.length; i++) {
            let position = this.positions[i];
            position.map(m => {
                flatPositions.push(m);
            })
            
            }
        return flatPositions
    }
  },

  mounted() {},

  // 方法实现
  methods: {
    handlePositionClick(pos) {
      console.log("点击货位:", pos.fictitiousPosition);
    },
  },
};
</script>

<style lang="scss" scoped></style>
